type Error native;

export function Error:
    &(String) => Error
    native '__Error';

export function Error:
    & { message: String, data: List[(String,String)] } => Error
    native '__ErrorWithData';

export method Error.String: String
    native '__ErrorToString';

export method Error.n: Number
    native '__ErrorNumOfIoBytes';

export method Error.is-EOF: Bool
    native '__ErrorIsEOF';

export method Error.is-closed-pipe: Bool
    native '__ErrorIsClosedPipe';

export function get:
    &(Error, String) => Maybe[String]
    native '__ErrorData';

export function wrap:
    &(Error, &(String) => String) => Error
    native '__ErrorWrap';


